package com.news.model;

public class User {
    private Integer user_id;    // 用户ID
    private String username;
    private String password;   // 密码
    private String realname;   // 真实姓名
    private String email;      // 电子邮件
    private String admin;      // 管理员标识

    // 无参构造函数
    public User() {}

    public User(Integer user_id, String username, String password, String realname, String email, String admin) {
        this.user_id = user_id;
        this.username = username;
        this.password = password;
        this.realname = realname;
        this.email = email;
        this.admin = admin;
    }

    /**
     * 获取
     * @return user_id
     */
    public Integer getUser_id() {
        return user_id;
    }

    /**
     * 设置
     * @param user_id
     */
    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    /**
     * 获取
     * @return username
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置
     * @param username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取
     * @return realname
     */
    public String getRealname() {
        return realname;
    }

    /**
     * 设置
     * @param realname
     */
    public void setRealname(String realname) {
        this.realname = realname;
    }

    /**
     * 获取
     * @return email
     */
    public String getEmail() {
        return email;
    }

    /**
     * 设置
     * @param email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * 获取
     * @return admin
     */
    public String getAdmin() {
        return admin;
    }

    /**
     * 设置
     * @param admin
     */
    public void setAdmin(String admin) {
        this.admin = admin;
    }

    public String toString() {
        return "User{user_id = " + user_id + ", username = " + username + ", password = " + password + ", realname = " + realname + ", email = " + email + ", admin = " + admin + "}";
    }
}